<?php

namespace apiend\modules\course\controllers;

use Yii;
use apiend\components\Controller;
use common\models\course\CourseCategory;

/**
 * 课程模块分类相关接口
 * Default controller for the `course` module
 */
class CategoryController extends Controller {

    public $modelClass = 'apiend\modules\course\models\CourseCategorySearch';

    /**
     * 根据分类ID检索课程列表
     * @inheritdoc
     */
    public function actionIndex() {
        return CourseCategory::getCategoryTree();
    }

}
